﻿Imports System
Imports System.IO

Public Class frmOption

	Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		'cmbExtractTo.SelectedIndex = My.Settings.ExtractToIndex
		'cmbCompressTo.SelectedIndex = My.Settings.CompressToIndex
	End Sub

	Private Sub Form2_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
		End
	End Sub

	Private Sub Form2_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
		For Each item As String In e.Data.GetData(DataFormats.FileDrop, False)
			'Form1.Extract(item)
		Next
	End Sub

	Private Sub Form2_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
		'コントロール内にドラッグされたとき実行される
		If e.Data.GetDataPresent(DataFormats.FileDrop) Then
			'ドラッグされたデータ形式を調べ、ファイルのときはコピーとする
			e.Effect = DragDropEffects.Copy
		Else
			'ファイル以外は受け付けない
			e.Effect = DragDropEffects.None
		End If
	End Sub

	Private Sub btnBrowseExtractFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowseExtractFolder.Click
		If FolderBrowserDialog.ShowDialog = DialogResult.OK Then
			txtExtractFolder.Text = FolderBrowserDialog.SelectedPath
		End If
	End Sub

	Private Sub cmbExtractTo_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
		If cmbExtractTo.SelectedIndex = 3 Then
			txtExtractFolder.Enabled = True
			btnBrowseExtractFolder.Enabled = True
		Else
			txtExtractFolder.Enabled = False
			btnBrowseExtractFolder.Enabled = False
		End If
	End Sub

	Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click
		My.Settings.Save()
		End
	End Sub

	Private Sub btnApply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApply.Click
		My.Settings.ExtractToIndex = cmbExtractTo.SelectedIndex
		My.Settings.Save()
	End Sub

	Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
		End
	End Sub

	Private Sub chbExtractCreateFolder_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chbExtractCreateFolder.CheckedChanged
		'chbExtractNotCreateDouble.Enabled = chbExtractCreateFolder.Checked
	End Sub








Private Sub cmbExtractTo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbExtractTo.SelectedIndexChanged
	If cmbExtractTo.SelectedIndex = 0 Then
		txtExtractFolder.Enabled = True
		btnBrowseExtractFolder.Enabled = True
	Else
		txtExtractFolder.Enabled = False
		btnBrowseExtractFolder.Enabled = False
	End If
End Sub



Private Sub grbExtactFolder_Enter(sender As Object, e As EventArgs) Handles grbExtactFolder.Enter

End Sub
End Class
